import myaxios from "../../MyAxios";

import BASEURL from '@/http/BaseUrl'
const BMDURL = BASEURL.BMDURL

const userApi = {
  /**
   * 注册接口 
   * @param {Object} params {user,pwd,name,phone,email}
   */
  registerApi(params){
    return myaxios.post(BMDURL+"/user/register",params)
  },

  /**
   * 登录接口 
   * @param {Object} params {user,pwd}
   */
  loginApi(params){
    return myaxios.post(BMDURL+"/user/login",params)
  },
  /**
   * 用户推荐接口 
   * @param {Object} params {name,score,director,actor,showingon,country,type,imgs,cont,tj_cont,user}
   */
  tuijian(params){
    return myaxios.post(BMDURL+"/user/tuijian",params)
  },

  /**
   * 用户修改推荐接口 
   * @param {Object} params {name,score,director,actor,showingon,country,type,imgs,cont,tj_cont,user}
   */
  tuijian_xiugai(params){
    return myaxios.post(BMDURL+"/user/tuijian_xiugai",params)
  },

  /**
   * 动漫收藏接口 
   * @param {Object} params {type=dongman,id=5,user=zsy}
   */
  dongman(params){
    return myaxios.get(BMDURL+"/user/dongman",params)
  },

  /**
   * 点赞计数器接口 
   * @param {Object} params {name='他是谁',user=zsy,type='dianshi'}
   */
  dianzan(params){
    return myaxios.post(BMDURL+"/user/dianzan",params)
  },

  /**
   * 显示审核信息接口 
   * @param {Object} params {user,page,pagesize,user_status}
   */
  shenhe(params){
    return myaxios.post(BMDURL+"/user/shenhe",params)
  },

  /**
   * 删除审核信息接口 
   * @param {Object} params {id,user_status}
   */
  shenhe_delete(params){
    return myaxios.post(BMDURL+"/user/shenhe-delete",params)
  },

   /**
   * 根据id查看审核具体信息
   * @param {Object} params {id}
   */
   shenheByid(params){
    return myaxios.get(BMDURL+"/user/shenheByid",params)
  },

  /**
   * 电视剧收藏接口 
   * @param {Object} params {type,id}
   */
  dianshi(params){
    return myaxios.get(BMDURL+"/user/dianshi",params)
  },

  /**
   * 通过用户名查询收藏接口 
   * @param {Object} params {user,page,pagesize}
   */
  search_collects(params){
    return myaxios.get(BMDURL+"/user/search_collects",params)
  },
  /**
   * 通过id查询收藏影视的具体信息 
   * @param {Object} params {user,page,pagesize}
   */
  infos_collectsByid(params){
    return myaxios.get(BMDURL+"/user/infos_collectsByid",params)
  },
/**
   * 查询收藏影视的id {user,type,name}
   * @param {Object} params {user,type,name}
   */
get_collectsId(params){
  return myaxios.get(BMDURL+"/user/get_collectsId",params)
},

  /**
   * 电影收藏接口 
   * @param {Object} params {type,id}
   */
  movies(params){
    return myaxios.get(BMDURL+"/user/movies",params)
  },
// 取消收藏接口 @param {Object} params {tid}
  shoucang(params){
    return myaxios.post(BMDURL+"/user/collect_delete",params)
  },
  // 修改用户头像 @param {Object} params {tid}
  user_update_avatar(params){
    return myaxios.post(BMDURL+"/user_update_avatar",params)
  },
  // 修改用户信息 @param {Object} params {tid}
  user_update(params){
    return myaxios.post(BMDURL+"/user_update",params)
  }

}
export default userApi